<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>手动互调干扰计算</title>

<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/themes/icon.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript">


	function refresh(){
		$("#channel").val("");
		$("#infchannel").val("");
		$("#result").val("");
		
	}
	function calculate(){
		var State=$('#selectpattern').combobox('getValue');   
		var Channel=$("#channel").val();
		var Infchannel=$("#infchannel").val() 
		$.post("${pageContext.request.contextPath}/interferencequery/calintermodu.do",{state:State,channel:Channel,infchannel:Infchannel},function(result){
				if(!result.success){
					$.messager.alert("系统提示","请按要求选择模式或输入正确的数据！");
					$("#result").val("请按要求选择模式或输入正确的数据！");
				}
				else{
					$("#result").val(result.value);
					$.messager.alert("系统提示","计算结束");
				}
			},"json");
			
	}
	

</script>
</head>
<body>
<div class="easyui-window" title="互调干扰计算" data-options="modal:false,closable:false,minimizable:false,maximizable:false,collapsible:false,draggable:false" style="width:650px;height:450px;padding:10px;">
	<form id="fm" action="" method="post">
		<table cellpadding="10px" url="" fit="true" >
			<tr align="center">
				<th colspan="3" style="padding-bottom: 10px"><big>手动互调干扰计算</big></th>
			</tr>
			<tr align="center">
				<th colspan="3" style="padding-bottom: 10px">提示：信道号/频率输入用","隔开(如:1,2),且干扰信道号/频率至少有2个</th>
			</tr>
			<tr>
				<td style="text-align:center;width: 200px">选择输入模式：</td>
				<td style="width: 350px">
				    <input class="easyui-combobox" id="selectpattern" 
					    data-options="valueField:'lable',textField:'value',
					    data:[{
					                lable:'0',
					                value:'输入为信道号(1-124,999-1024)'
					            },
					            {
					                lable:'1',
					                value:'输入为频率(885-915,930-960 MHz)'
					            }]" value="0" style="text-align:center;width: 300px" editable="false"/>
			    </td>
			</tr>
			<tr>
				<td style="text-align:center;width: 200px">干扰信道号/频率：</td>
				<td style="width: 350px">
					<input type="text" id="channel" name="channel" class="easyui-validatebox"  values="" style="text-align:center;width: 300px" required="true"/>
				</td>
			</tr>
			<tr>
				<td style="text-align:center;width: 200px">被干扰信道号/频率：</td>
				<td style="width: 350px">
                     <input type="text" id="infchannel" name="infchannel" class="easyui-validatebox" values="" style="text-align:center;width:300px" required="true"/>
				</td>
			</tr>
			<tr>
				<td style="text-align:center;width: 200px">计算结果：</td>
				<td style="width: 300px">
				    <textarea name="result" cols="38" rows="6"  id="result" wrap="hard"></textarea>
				</td>
			</tr>
			<tr>
				<td>	
					
				</td>
				<td>
					<a href="javascript:calculate()" class="easyui-linkbutton" >计算</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<a href="javascript:refresh2()" class="easyui-linkbutton" >清空</a>
				</td>
			</tr>
		</table>
	</form>
</div>
</body>
</html>